#ifndef _OPERATION_RESULT_H
#define _OPERATION_RESULT_H

namespace NetIO
{

class Operation_Result
{
public:
	Operation_Result (void)
	{
		reset ();
	};

	Operation_Result (const Operation_Result &result)
	{
		optype_ = result.optype_;
		errcode_ = result.errcode_;
		data_block_ = result.data_block_;
		act_ = result.act_;
		bytes_transferred_ = result.bytes_transferred_;
		handle_ = result.handle_;
	}

	Operation_Result & operator = (const Operation_Result &result)
	{
		optype_ = result.optype_;
		errcode_ = result.errcode_;
		data_block_ = result.data_block_;
		act_ = result.act_;
		bytes_transferred_ = result.bytes_transferred_;
		handle_ = result.handle_;
		return *this;
	}

	~Operation_Result (void)
	{
		reset ();
	}

public:
	void reset ()
	{
		optype_ = 0;
		errcode_ = 0;
		data_block_ = 0;
		act_ = 0;
		bytes_transferred_ = 0;
	}

	int optype_;
	int errcode_;
	DataBlock *data_block_;
	void *act_;
	int bytes_transferred_;
	Socket handle_;
};

};
#endif

